//        ___________            _____    __________________ 
//        \__    ___/_________  /     \  /  _____/\______   \
//          |   | /  _ \_  __ \/  \ /  \/   \  ___ |       _/
//          |   |(  <_> )  | \/    Y    \    \_\  \|    |   \
//          |___| \____/|__|  \____|__  /\______  /|____|_  /
//                                    \/        \/        \/ -JPL
// TorMGR.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "Torrent/Bencode/Factory.h"

#include <iostream>
#include <fstream>
using namespace std;


int _tmain(int /*argc*/, _TCHAR* /*argv[]*/)
{
    Torrent::Bencode::IPrimitive* pTorrent = NULL;
    ifstream torFile("a.torrent");
    if (torFile.is_open())
    {
        pTorrent = Torrent::Bencode::Factory::create(torFile);
        torFile.close();

        ofstream myfile;
        myfile.open("b.torrent");
        pTorrent->print(myfile);
        myfile.close();
    }

    return 0;
}

